<div class="widget">
    <h3 style="text-align: left">Tin tức</h3>
    
    <div class="register_content">
    <?php
        if(count($this->data) > 0) :
            $common = new Default_Model_Common();
            foreach($this->data as $value) : ?>
        <div class="news_list">
            <div class="news_image">
                <img src="<?php echo $this->baseUrl('/public/files/news/') . $value['news_image']; ?>" />
            </div>
            
            <div class="news_main">
                <a class="news_title" href="<?php echo $this->baseUrl('news/details/id/') . $value['news_id']; ?>">
                    <?php echo $value['news_title']; ?>
                </a>
                
                <p style="font-style: italic;">Ngày đăng: 
                    <?php $sqldate = strtotime($value['create_date']);
                        $create_date = date('d/m/Y H:i', $sqldate);
                        echo $create_date; ?>
                </p>
                
                <div class="news_plaintext">
                    <?php $content = preg_replace('/\s+/', ' ', $value['news_plaintext']);
                          echo $common->cut_string($content, 600, 1); ?>
                </div>
            </div>
        </div>
        <?php endforeach; ?>
        
        <div style="clear: both;"></div>
        
        <div class="pagination">
            <?php echo $this->paginationControl($this->data, 'Sliding', 'news/pagination.phtml'); ?>
        </div>
    <?php endif; ?>
    </div>
</div>